package String;

public class test4 {
    public static void main(String[] args) {
        String str="abc";
        String s = reverse(str);
        System.out.println(s);
    }

    public static String reverse(String str){
        String res="";
        for (int i = str.length()-1; i >= 0; i--) {
            char c=str.charAt(i);
            res=res+c;
        }
        return res;
    }
}
